﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using MBSVO;
using MBSBLC;


namespace MBS_FoodBooking.Models
{
    public class FoodItem
    {
        BLC businessProxy = new BLC();  
        private int _FoodID;

        public int FoodID
        {
            get { return _FoodID; }
            set { _FoodID = value; }
        }
        private string _Category;

        public string Category
        {
            get { return _Category; }
            set { _Category = value; }
        }

        private string _Name;

        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        private string _ImgUrl;

        public string ImgUrl
        {
            get { return _ImgUrl; }
            set { _ImgUrl = value; }
        }

       
        private decimal _ItemPrice;

        public decimal ItemPrice
        {
            get { return _ItemPrice; }
            set { _ItemPrice = value; }
        }

        public List<FoodItem> getFoodItems()
        {
            List<FoodItem> MenuItemList = new List<FoodItem>();
            List<FoodVO> lstFoodMenu = businessProxy.getAllFoodItems();
            foreach (FoodVO foodItem in lstFoodMenu)
            {
                FoodItem food = new FoodItem();
                food.FoodID = foodItem.FoodID;
                food.Category = foodItem.Category;
                food.ImgUrl = foodItem.ImageUrl;
                food.ItemPrice = foodItem.Price;
                food.Name = foodItem.Name;
                MenuItemList.Add(food);
            }
            return MenuItemList;
        }

    }
}